﻿using System.Xml.Linq;

namespace Comdiv.UXmlDiff {
	public class XDiffAnnotation {
		public string Id { get; set; }
		public XObject XObj { get; set; }
		public XDiffAnnotationType Type { get; set; }
		public string OldValue { get; set; }
		public string NewValue { get; set; }
		public override string ToString()
		{
			if(Type==XDiffAnnotationType.Changed|| Type==XDiffAnnotationType.NewValue) {
				return string.Format("{0} {1}: from {2} to {3}", Id, Type, OldValue, NewValue);
			}
			return string.Format("{0} {1}", Id, Type, OldValue, NewValue);
		}
	}
}